package com.bjpower.models.request;

import jakarta.validation.constraints.DecimalMin;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

import java.math.BigDecimal;

@Data
public class PayWayConfigRequest {

    @NotNull(message = "产品编码不能空")
    @Size(min = 4,max = 30,message = "产品编码在{min}-{max}个字符")
    private String productCode ;

    @NotNull(message = "支付方式编码不能空")
    @Size(min = 6,max = 30,message = "支付方式编码在{min}-{max}个字符")
    private String wayCode ;

    @NotNull(message = "支付类型编码不能空")
    @Size(min = 5,max = 30,message = "支付类型编码在{min}-{max}个字符")
    private String typeCode ;

    @NotNull(message = "手续费不能空")
    @DecimalMin(value = "0.1",message = "手续费不能低于0.1%")
    private BigDecimal payRate ;

    @NotNull(message = "排序不能为空")
    @Min(value = 1 ,message = "排序从1开始")
    private Integer sorts ;
}
